home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / ANSIshellƒ / os_mac.h < prev   
Encoding:
C/C++ Source or Header  |  1995-05-04  |  3.6 KB  |  179 lines  |  [TEXT/R*ch]

  1. /* os_mac.h */
  2.  
  3. /* extracted from os_mac.c, eEdit.c, ext_mac.c, eStyle.c  30Jun92  e */
  4.  
  5. /* Macintosh specific stuff. */
  6.  
  7. #include <Retrace.h>
  8. #include <Folders.h>
  9.  
  10. /*
  11. #define USE_eTe_debug (1) */
  12.  
  13. #include "os_mac_options.h"
  14.  
  15. #include "os_mac_eEdit.h"
  16. #define TeHANDLE eTeHandle
  17.  
  18. #define dfltTabs (8)
  19. #define dfltWrap (357)
  20. #define dfltAutoInd (0)
  21.  
  22. /* prototypes for eStyle.c and eKeys.c */
  23. void eStyleDlg( eRec **hE );
  24. void eEditCommand( eRec **hE, char ch, short modifiers, short style );
  25. void eTabCommand( eRec **hE, short modifiers, short style );
  26.  
  27. /* options which should be defined in "os_mac_options.h" */
  28.  
  29. #ifndef PREFS_FILENAME
  30. #define PREFS_FILENAME "\ppfshell Preferences"
  31. #endif
  32. #ifndef CREATOR
  33. #define CREATOR 'PFIL'
  34. #endif
  35. #ifndef XlateRETURNp
  36. #define XlateRETURNp 1
  37. #endif
  38. #ifndef ReadHangsP
  39. #define ReadHangsP 0
  40. #endif
  41. #ifndef ANSIquitP
  42. #define ANSIquitP 0
  43. #endif
  44. #ifndef pauseForQuitP
  45. #define pauseForQuitP 1
  46. #endif
  47. #ifndef LISPmodeP
  48. #define LISPmodeP 0
  49. #endif
  50.  
  51. #ifndef USE_EVENTCHK_TIMER
  52. #define USE_EVENTCHK_TIMER 0
  53. #endif
  54.  
  55. #ifndef beg_mf_time
  56. #define beg_mf_time()
  57. #endif
  58. #ifndef end_mf_time
  59. #define end_mf_time()
  60. #endif
  61.  
  62. #ifndef dosc_open_str
  63. #define dosc_open_str " (load \""
  64. #endif
  65. #ifndef dosc_open_str_sz
  66. #define dosc_open_str_sz 8
  67. #endif
  68. #ifndef dosc_clos_str
  69. #define dosc_clos_str "\")"
  70. #endif
  71. #ifndef dosc_clos_str_sz
  72. #define dosc_clos_str_sz 2
  73. #endif
  74.  
  75.  
  76. void savePrefs( ConstStr255Param fn );
  77.  
  78. #define FontSize 9
  79. #define FontH 12
  80. #define FontW 6
  81. #define Border 3
  82. #define SBarWidth 15
  83.  
  84. #define ok_alertID        128
  85. #define ok_cancel_alertID 129
  86.  
  87. #define loading_dlogID 130
  88. #define about_dlogID   131
  89. #define find_dlogID    358
  90.  
  91. #define appleID   128
  92. #define fileID    129
  93. #define editID    130
  94. #define commandID 131
  95. #define windowsID 132
  96. #define specialID 133
  97. #define findID    134
  98.  
  99. #define newCommand       1
  100. #define openCommand      2
  101. #define closeCommand     3
  102. #define saveCommand      5
  103. #define saveasCommand    6
  104. #define revertCommand    7
  105. #define pgsetupCommand   9
  106. #define printCommand     10
  107. #define quitCommand      12
  108.  
  109. #define undoCommand       1
  110. #define cutCommand        3
  111. #define copyCommand       4
  112. #define pasteCommand      5
  113. #define clearCommand      6
  114. #define selAllCommand     7
  115. #define stylesCommand      9
  116. #define showPosnCommand      10
  117.  
  118. #define findCommand       1
  119. #define againCommand      2
  120. #define replaceCommand    3
  121. #define fEnterCommand     4
  122. #define replaceAllCommand 5
  123. #define findErrorCommand  6
  124.  
  125. #define interruptCommand  1
  126. /* the rest of the menu items should be defined in "os_mac_options.h" */
  127.  
  128. #define appleM   0
  129. #define fileM    1
  130. #define editM    2
  131. #define findM    3
  132. #define commandM 4
  133. #define windowsM 5
  134. #define specialM 6
  135.  
  136. #define gc_cursorID 128
  137.  
  138. #define MAX_NB_WINDOWS 12
  139. #define FILENAME_LEN 256
  140. #define OUT_BUF_LEN 256
  141.  
  142. extern MenuHandle menus[7];
  143. extern TextStyle prefStylNormal;
  144. extern TextStyle prefStylHilite;
  145. extern TextStyle dfltStylNormal;
  146. extern TextStyle dfltStylHilite;
  147.  
  148. extern short prefTabs;
  149. extern short prefWrap;
  150. extern short prefAutoInd;
  151.  
  152. extern Cursor watch_cursor;
  153. extern Cursor gc_cursor;
  154. extern Cursor ibeam_cursor;
  155.  
  156. extern short interrupted;
  157.  
  158. void os_quit(void);
  159. WindowPeek os_console_new( unsigned char *name );
  160. long os_console_read(  WindowPeek wp, unsigned char *ptr, long cnt );
  161. long os_console_read_nohang( WindowPeek wp, unsigned char *ptr, long cnt );
  162. long os_console_write( WindowPeek wp, unsigned char *ptr, long cnt );
  163. long os_console_close( WindowPeek wp );
  164. long os_console_chars_ready(WindowPeek wp);
  165.  
  166. void os_event_check( void );
  167.  
  168. #if USE_EVENTCHK_TIMER
  169. void init_eck_timer(void);
  170. void cancel_eck_timer(void);
  171. #endif
  172.  
  173. void eDoCommand(short theItem);
  174.  
  175. #include "os_mac_proto.h"
  176. #include "os_mac_str.h"
  177.  
  178. /* end of os_mac.h */
  179.